Skip to main content

nativeCharToNum

Type

function

Summary

Returns the 8-bit value corresponding to a native character.

Syntax

the nativeCharToNum of <nativeCharacter>
nativeCharToNum(<nativeCharacter>)

Description

Use the nativeCharToNum function to translate native characters to their 8-bit numerical value.

The nativeCharToNum function is the inverse of the numToNativeChar function.

These functions convert between text and native characters and are replacements for the deprecated numToChar and charToNum functions.

As the native character sets for each platform have a limited and different repertoire, these functions should not be used when preservation of Unicode text is desired. Any characters that cannot be mapped to the native character set are replaced with a question mark character (?).

Unless needed for compatibility reasons, it is recommended that you use the numToCodepoint and codepointToNum functions instead.

Parameters

NameTypeDescription

nativeCharacter

A single native character.

Examples

put nativeCharToNum("A")
get nativeCharToNum(space)

function: numToChar, charToNum, numToNativeChar, numToCodepoint, codepointToNum

Compatibility and Support

Introduced

LiveCode 7.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?